<% layout('/layout/default.html', {title: 'OFD文件查看', libs: ['ofd']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa fa-sitemap"></i>OFD文件查看
			</div>
		</div>
		<div class="box-body">
			<div class="row">
				<div id="btnDiv" class="col-xs-12"></div>
			</div>
			<div class="row">
				<div id="ofdDiv" class="col-xs-12" ></div>
			</div>
		</div>
		
	</div>
</div>

<% } %>
<script type="text/javascript">

	$(document).ready(function() {
		var width = $(".box-body").outerWidth();
		js.log("width=" + width);
		var ocx = ofdreader.init("ofdDiv", ("1550px"), "696px");
		if (ocx) {
			//业务逻辑初始化，例如隐藏插件中的按钮，加载文档等
			ocx.setCompsiteVisible("f_open", true);
			ocx.setCompsiteVisible("f_print", true);
			ocx.setCompsiteEnable("d_sealsign", true);

			ocx.openFile("${ctx}/${sysFile.path}", true);
		}
	});
</script>